package com.grape.feign.callback;

import com.grape.entity.SysOperateLog;
import com.grape.feign.UserFeign;
import com.grape.result.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Slf4j
public class UserFeignCallback implements UserFeign {

    @Override
    public R getByUsername(String username) {
        log.error("根据用户名查出用户..........");
        return R.callback("兜底数据", null);
    }

    @Override
    public R getByPhone(String phone) {
        log.error("根据手机号码查出用户....................出用户");
        return R.callback("兜底数据", null);
    }

    @Override
    public R getByUserId(String userId) {
        log.error("User Server Fallback..........");
        return R.callback("兜底数据", null);
    }

    @Override
    public R getPermissionByUserId(String userId) {
        log.error("User Server Fallback..........");
        return R.callback("兜底数据", null);
    }

    @Override
    public R insert(SysOperateLog sysOperateLog) {
        log.error("User Server Fallback..........");
        return R.callback("兜底数据", null);
    }
}
